<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>电子书管理</title>
    <!-- 引入公用部分 -->
    <script th:replace="common/head::static"></script>
</head>
<body>
<!--搜索工具栏-->
<script type="text/html" id="toolbarBook">
    <div class="layui-inline" style="float:right;height:29px;" title="Reset" lay-event="reset"><i
            class="layui-icon layui-icon-fonts-clear"></i></div>
    <div class="layui-inline" style="float:right;height:29px;" title="Refresh" lay-event="refresh"><i
            class="layui-icon layui-icon-refresh-1"></i></div>
    <div class="layui-inline" style="float:right;height:29px;" title="Search" lay-event="query"><i
            class="layui-icon layui-icon-search"></i></div>
    <input type="text" id="bookTitle" style="width:200px;float:right;height:30px;" placeholder="请输入小说名"
           autocomplete="off" class="layui-input">
    <input type="text" id="bookCategory" style="width:200px;float:right;height:30px;" placeholder="类别"
           autocomplete="off" class="layui-input">
    <input type="text" id="bookCategoryHidden" name="bookCategory" hidden="hidden" />
    <input type="text" style="width:200px;float:right;height:30px;" id="bookWeb" autocomplete="off"  placeholder="网站源" class="layui-input"  />
    <input type="text" id="bookWebHidden" name="bookWeb" hidden="hidden" />

    </div>
</script>

<table class="layui-hide" id="ID-table-book-preview" lay-filter="test"></table>
<!--标题-->
<script type="text/html" id="ID-table-book-preview-title">
    <a href="{{= d.bookUrl }}" target="_blank">{{= d.bookTitle }}</a>
</script>
<!--最新章节-->
<script type="text/html" id="ID-table-book-preview-chapter">
    <a href="{{= d.lastUpdateChapterUrl }}" target="_blank">{{= d.lastUpdateChapter }}</a>
</script>
<!--其他-->
<script type="text/html" id="ID-table-book-preview-other">
    <span class="layui-badge-rim" style="margin-right: 10px;">最新章节：<a href="{{= d.lastUpdateChapterUrl }}"
                                                                          target="_blank">{{= d.lastUpdateChapter }}</a></span>
    <span class="layui-badge-rim" style="margin-right: 10px;">作者：{{= d.bookAuthor }}</span>
    <span class="layui-badge-rim">字数：{{= d.bookSize }}万字</span>
    <span class="layui-badge-rim">状态：{{= d.bookState }}</span>
    <span class="layui-badge-rim">更新时间：{{= d.lastUpdateTime }}</span>
    <span class="layui-badge-rim">
        <a href="/book/info/v1/download?bookId={{= d.bookId }}" alt="{{= d.bookTitle }}" target="_blank">下载到本地</a>
    </span>
</script>
<!--右侧操作按钮-->
<script type="text/html" id="operationBar">
    <div class="layui-clear-space">
        <a class="layui-btn layui-btn-xs" lay-event="cacheDownload">缓存下载</a>
        <a class="layui-btn layui-btn-xs" href="/book/info/v1/syncDownloadBook?bookId={{= d.bookId }}">同步下载</a>
        <a class="layui-btn layui-btn-xs" lay-event="del">删除</a>
    </div>
</script>

<!--小说明细-->
<div class="bookDetailDiv">
    <!-- 操作表单 -->
    <form id="bookForm" class="layui-form layui-form-pane">
        <div class="layui-form-item">
            <label class="layui-form-label">标题</label>
            <div class="layui-input-block">
                <input type="text" id="title" name="bookTitle" autocomplete="off" placeholder="标题"
                       class="layui-input">
            </div>
        </div>
        <div class="layui-form-item layui-form-text">
            <div class="layui-input-block">
                <textarea id="bookIntro" name="bookIntro" placeholder="简介" class="layui-textarea"></textarea>
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-progress layui-progress-big" lay-showpercent="true" lay-filter="bookDownloadProgress">
                <div class="layui-progress-bar layui-bg-red" lay-percent="0%"></div>
            </div>
        </div>
        <!-- 隐藏域 -->
        <input type="text" id="bookId" name="bookId" hidden="hidden" value="-1"/>
        <input type="text" id="bookUrl" name="bookUrl" hidden="hidden" value=""/>
    </form>
</div>
</body>
<link rel="stylesheet" lang="less" scoped type="text/css" th:href="@{book/bookinfo/bookinfo.css(v=${version})}"/>
<script th:src="@{book/bookinfo/bookinfo.js(v=${version})}"></script>
</html>